<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ attribute name="tree" required="true" rtexprvalue="true"
	type="com.whale.kernel.model.tree.Tree"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!-- Only show tree level hierarchy -->
<ul id="treePages" class="filetree">
	<c:forEach var="node1" items="${tree.topNodes}">
		<li onclick="selectNode(event, this);" id="${node1.nodeId}"><span class="menu">${node1.name}</span>
			<c:if test="${node1.subnodes != null && ! empty node1.subnodes}">
				<ul>
					<c:forEach var="node2" items="${node1.subnodes}">
						<li onclick="selectNode(event, this);" id="${node2.nodeId}"
							class="closed"><span class="menu"> ${node2.name} </span></li>
					</c:forEach>
				</ul>
			</c:if>
		</li>
	</c:forEach>
</ul>
